package com.example.interceptor;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAnnoInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        try {
            System.out.println("annotation-开始执行: " + invocation.getMethod().getName());
            return invocation.proceed();
        } finally {
            System.out.println("annotation-执行： " + invocation.getMethod().getName() + "完毕");
        }
    }
}
